1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is the Java Runtime Interface.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation and Sun Microsystems, Inc.
18 * Portions created by the Initial Developer are Copyright (C) 1993-1996
19 * the Initial Developer. All Rights Reserved.
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
43 /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
56 typedef unsigned char jboolean
;
57 typedef unsigned short jchar
;
60 typedef double jdouble
;
67 class _jclass
: public _jobject
{};
68 class _jthrowable
: public _jobject
{};
69 class _jstring
: public _jobject
{};
70 class _jarray
: public _jobject
{};
71 class _jbooleanArray
: public _jarray
{};
72 class _jbyteArray
: public _jarray
{};
73 class _jcharArray
: public _jarray
{};
74 class _jshortArray
: public _jarray
{};
75 class _jintArray
: public _jarray
{};
76 class _jlongArray
: public _jarray
{};
77 class _jfloatArray
: public _jarray
{};
78 class _jdoubleArray
: public _jarray
{};
79 class _jobjectArray
: public _jarray
{};
81 typedef _jobject
*jobject
;
82 typedef _jclass
*jclass
;
83 typedef _jthrowable
*jthrowable
;
84 typedef _jstring
*jstring
;
85 typedef _jarray
*jarray
;
86 typedef _jbooleanArray
*jbooleanArray
;
87 typedef _jbyteArray
*jbyteArray
;
88 typedef _jcharArray
*jcharArray
;
89 typedef _jshortArray
*jshortArray
;
90 typedef _jintArray
*jintArray
;
91 typedef _jlongArray
*jlongArray
;
92 typedef _jfloatArray
*jfloatArray
;
93 typedef _jdoubleArray
*jdoubleArray
;
94 typedef _jobjectArray
*jobjectArray
;
100 typedef struct _jobject
*jobject
;
101 typedef jobject jclass
;
102 typedef jobject jthrowable
;
103 typedef jobject jstring
;
104 typedef jobject jarray
;
105 typedef jarray jbooleanArray
;
106 typedef jarray jbyteArray
;
107 typedef jarray jcharArray
;
108 typedef jarray jshortArray
;
109 typedef jarray jintArray
;
110 typedef jarray jlongArray
;
111 typedef jarray jfloatArray
;
112 typedef jarray jdoubleArray
;
113 typedef jarray jobjectArray
;
117 typedef jobject jweak
;
119 #if 0 /* moved to jri_md.h */
120 typedef jobject jref
; /* For transition---not meant to be part of public
124 typedef union jvalue
{
137 typedef struct _jfieldID
*jfieldID
;
140 typedef struct _jmethodID
*jmethodID
;
150 * possible return values for JNI functions.
153 #define JNI_OK 0 /* success */
154 #define JNI_ERR (-1) /* unknown error */
155 #define JNI_EDETACHED (-2) /* thread detached from the VM */
156 #define JNI_EVERSION (-3) /* JNI version error */
157 #define JNI_ENOMEM (-4) /* not enough memory */
158 #define JNI_EEXIST (-5) /* VM already created */
159 #define JNI_EINVAL (-6) /* invalid arguments */
162 * used in ReleaseScalarArrayElements
169 * used in RegisterNatives to describe native method name, signature,
170 * and function pointer.
180 * JNI Native Method Interface.
183 struct JNINativeInterface_
;
188 typedef JNIEnv_ JNIEnv
;
190 typedef const struct JNINativeInterface_
*JNIEnv
;
194 * JNI Invocation Interface.
197 struct JNIInvokeInterface_
;
202 typedef JavaVM_ JavaVM
;
204 typedef const struct JNIInvokeInterface_
*JavaVM
;
207 struct JNINativeInterface_
{
213 jint (JNICALL
*GetVersion
)(JNIEnv
*env
);
215 jclass (JNICALL
*DefineClass
)
216 (JNIEnv
*env
, const char *name
, jobject loader
, const jbyte
*buf
,
218 jclass (JNICALL
*FindClass
)
219 (JNIEnv
*env
, const char *name
);
221 jmethodID (JNICALL
*FromReflectedMethod
)
222 (JNIEnv
*env
, jobject method
);
223 jfieldID (JNICALL
*FromReflectedField
)
224 (JNIEnv
*env
, jobject field
);
226 jobject (JNICALL
*ToReflectedMethod
)
227 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, jboolean isStatic
);
229 jclass (JNICALL
*GetSuperclass
)
230 (JNIEnv
*env
, jclass sub
);
231 jboolean (JNICALL
*IsAssignableFrom
)
232 (JNIEnv
*env
, jclass sub
, jclass sup
);
234 jobject (JNICALL
*ToReflectedField
)
235 (JNIEnv
*env
, jclass cls
, jfieldID fieldID
, jboolean isStatic
);
237 jint (JNICALL
*Throw
)
238 (JNIEnv
*env
, jthrowable obj
);
239 jint (JNICALL
*ThrowNew
)
240 (JNIEnv
*env
, jclass clazz
, const char *msg
);
241 jthrowable (JNICALL
*ExceptionOccurred
)
243 void (JNICALL
*ExceptionDescribe
)
245 void (JNICALL
*ExceptionClear
)
247 void (JNICALL
*FatalError
)
248 (JNIEnv
*env
, const char *msg
);
250 jint (JNICALL
*PushLocalFrame
)
251 (JNIEnv
*env
, jint capacity
);
252 jobject (JNICALL
*PopLocalFrame
)
253 (JNIEnv
*env
, jobject result
);
255 jobject (JNICALL
*NewGlobalRef
)
256 (JNIEnv
*env
, jobject lobj
);
257 void (JNICALL
*DeleteGlobalRef
)
258 (JNIEnv
*env
, jobject gref
);
259 void (JNICALL
*DeleteLocalRef
)
260 (JNIEnv
*env
, jobject obj
);
261 jboolean (JNICALL
*IsSameObject
)
262 (JNIEnv
*env
, jobject obj1
, jobject obj2
);
263 jobject (JNICALL
*NewLocalRef
)
264 (JNIEnv
*env
, jobject ref
);
265 jint (JNICALL
*EnsureLocalCapacity
)
266 (JNIEnv
*env
, jint capacity
);
268 jobject (JNICALL
*AllocObject
)
269 (JNIEnv
*env
, jclass clazz
);
270 jobject (JNICALL
*NewObject
)
271 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
272 jobject (JNICALL
*NewObjectV
)
273 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
274 jobject (JNICALL
*NewObjectA
)
275 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
277 jclass (JNICALL
*GetObjectClass
)
278 (JNIEnv
*env
, jobject obj
);
279 jboolean (JNICALL
*IsInstanceOf
)
280 (JNIEnv
*env
, jobject obj
, jclass clazz
);
282 jmethodID (JNICALL
*GetMethodID
)
283 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
285 jobject (JNICALL
*CallObjectMethod
)
286 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
287 jobject (JNICALL
*CallObjectMethodV
)
288 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
289 jobject (JNICALL
*CallObjectMethodA
)
290 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
292 jboolean (JNICALL
*CallBooleanMethod
)
293 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
294 jboolean (JNICALL
*CallBooleanMethodV
)
295 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
296 jboolean (JNICALL
*CallBooleanMethodA
)
297 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
299 jbyte (JNICALL
*CallByteMethod
)
300 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
301 jbyte (JNICALL
*CallByteMethodV
)
302 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
303 jbyte (JNICALL
*CallByteMethodA
)
304 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
306 jchar (JNICALL
*CallCharMethod
)
307 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
308 jchar (JNICALL
*CallCharMethodV
)
309 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
310 jchar (JNICALL
*CallCharMethodA
)
311 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
313 jshort (JNICALL
*CallShortMethod
)
314 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
315 jshort (JNICALL
*CallShortMethodV
)
316 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
317 jshort (JNICALL
*CallShortMethodA
)
318 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
320 jint (JNICALL
*CallIntMethod
)
321 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
322 jint (JNICALL
*CallIntMethodV
)
323 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
324 jint (JNICALL
*CallIntMethodA
)
325 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
327 jlong (JNICALL
*CallLongMethod
)
328 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
329 jlong (JNICALL
*CallLongMethodV
)
330 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
331 jlong (JNICALL
*CallLongMethodA
)
332 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
334 jfloat (JNICALL
*CallFloatMethod
)
335 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
336 jfloat (JNICALL
*CallFloatMethodV
)
337 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
338 jfloat (JNICALL
*CallFloatMethodA
)
339 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
341 jdouble (JNICALL
*CallDoubleMethod
)
342 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
343 jdouble (JNICALL
*CallDoubleMethodV
)
344 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
345 jdouble (JNICALL
*CallDoubleMethodA
)
346 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
*args
);
348 void (JNICALL
*CallVoidMethod
)
349 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, ...);
350 void (JNICALL
*CallVoidMethodV
)
351 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, va_list args
);
352 void (JNICALL
*CallVoidMethodA
)
353 (JNIEnv
*env
, jobject obj
, jmethodID methodID
, jvalue
* args
);
355 jobject (JNICALL
*CallNonvirtualObjectMethod
)
356 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
357 jobject (JNICALL
*CallNonvirtualObjectMethodV
)
358 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
360 jobject (JNICALL
*CallNonvirtualObjectMethodA
)
361 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
364 jboolean (JNICALL
*CallNonvirtualBooleanMethod
)
365 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
366 jboolean (JNICALL
*CallNonvirtualBooleanMethodV
)
367 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
369 jboolean (JNICALL
*CallNonvirtualBooleanMethodA
)
370 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
373 jbyte (JNICALL
*CallNonvirtualByteMethod
)
374 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
375 jbyte (JNICALL
*CallNonvirtualByteMethodV
)
376 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
378 jbyte (JNICALL
*CallNonvirtualByteMethodA
)
379 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
382 jchar (JNICALL
*CallNonvirtualCharMethod
)
383 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
384 jchar (JNICALL
*CallNonvirtualCharMethodV
)
385 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
387 jchar (JNICALL
*CallNonvirtualCharMethodA
)
388 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
391 jshort (JNICALL
*CallNonvirtualShortMethod
)
392 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
393 jshort (JNICALL
*CallNonvirtualShortMethodV
)
394 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
396 jshort (JNICALL
*CallNonvirtualShortMethodA
)
397 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
400 jint (JNICALL
*CallNonvirtualIntMethod
)
401 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
402 jint (JNICALL
*CallNonvirtualIntMethodV
)
403 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
405 jint (JNICALL
*CallNonvirtualIntMethodA
)
406 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
409 jlong (JNICALL
*CallNonvirtualLongMethod
)
410 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
411 jlong (JNICALL
*CallNonvirtualLongMethodV
)
412 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
414 jlong (JNICALL
*CallNonvirtualLongMethodA
)
415 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
418 jfloat (JNICALL
*CallNonvirtualFloatMethod
)
419 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
420 jfloat (JNICALL
*CallNonvirtualFloatMethodV
)
421 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
423 jfloat (JNICALL
*CallNonvirtualFloatMethodA
)
424 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
427 jdouble (JNICALL
*CallNonvirtualDoubleMethod
)
428 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
429 jdouble (JNICALL
*CallNonvirtualDoubleMethodV
)
430 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
432 jdouble (JNICALL
*CallNonvirtualDoubleMethodA
)
433 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
436 void (JNICALL
*CallNonvirtualVoidMethod
)
437 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
, ...);
438 void (JNICALL
*CallNonvirtualVoidMethodV
)
439 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
441 void (JNICALL
*CallNonvirtualVoidMethodA
)
442 (JNIEnv
*env
, jobject obj
, jclass clazz
, jmethodID methodID
,
445 jfieldID (JNICALL
*GetFieldID
)
446 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
448 jobject (JNICALL
*GetObjectField
)
449 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
450 jboolean (JNICALL
*GetBooleanField
)
451 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
452 jbyte (JNICALL
*GetByteField
)
453 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
454 jchar (JNICALL
*GetCharField
)
455 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
456 jshort (JNICALL
*GetShortField
)
457 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
458 jint (JNICALL
*GetIntField
)
459 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
460 jlong (JNICALL
*GetLongField
)
461 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
462 jfloat (JNICALL
*GetFloatField
)
463 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
464 jdouble (JNICALL
*GetDoubleField
)
465 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
);
467 void (JNICALL
*SetObjectField
)
468 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jobject val
);
469 void (JNICALL
*SetBooleanField
)
470 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jboolean val
);
471 void (JNICALL
*SetByteField
)
472 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jbyte val
);
473 void (JNICALL
*SetCharField
)
474 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jchar val
);
475 void (JNICALL
*SetShortField
)
476 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jshort val
);
477 void (JNICALL
*SetIntField
)
478 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jint val
);
479 void (JNICALL
*SetLongField
)
480 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jlong val
);
481 void (JNICALL
*SetFloatField
)
482 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jfloat val
);
483 void (JNICALL
*SetDoubleField
)
484 (JNIEnv
*env
, jobject obj
, jfieldID fieldID
, jdouble val
);
486 jmethodID (JNICALL
*GetStaticMethodID
)
487 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
489 jobject (JNICALL
*CallStaticObjectMethod
)
490 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
491 jobject (JNICALL
*CallStaticObjectMethodV
)
492 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
493 jobject (JNICALL
*CallStaticObjectMethodA
)
494 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
496 jboolean (JNICALL
*CallStaticBooleanMethod
)
497 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
498 jboolean (JNICALL
*CallStaticBooleanMethodV
)
499 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
500 jboolean (JNICALL
*CallStaticBooleanMethodA
)
501 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
503 jbyte (JNICALL
*CallStaticByteMethod
)
504 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
505 jbyte (JNICALL
*CallStaticByteMethodV
)
506 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
507 jbyte (JNICALL
*CallStaticByteMethodA
)
508 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
510 jchar (JNICALL
*CallStaticCharMethod
)
511 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
512 jchar (JNICALL
*CallStaticCharMethodV
)
513 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
514 jchar (JNICALL
*CallStaticCharMethodA
)
515 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
517 jshort (JNICALL
*CallStaticShortMethod
)
518 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
519 jshort (JNICALL
*CallStaticShortMethodV
)
520 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
521 jshort (JNICALL
*CallStaticShortMethodA
)
522 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
524 jint (JNICALL
*CallStaticIntMethod
)
525 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
526 jint (JNICALL
*CallStaticIntMethodV
)
527 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
528 jint (JNICALL
*CallStaticIntMethodA
)
529 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
531 jlong (JNICALL
*CallStaticLongMethod
)
532 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
533 jlong (JNICALL
*CallStaticLongMethodV
)
534 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
535 jlong (JNICALL
*CallStaticLongMethodA
)
536 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
538 jfloat (JNICALL
*CallStaticFloatMethod
)
539 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
540 jfloat (JNICALL
*CallStaticFloatMethodV
)
541 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
542 jfloat (JNICALL
*CallStaticFloatMethodA
)
543 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
545 jdouble (JNICALL
*CallStaticDoubleMethod
)
546 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, ...);
547 jdouble (JNICALL
*CallStaticDoubleMethodV
)
548 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, va_list args
);
549 jdouble (JNICALL
*CallStaticDoubleMethodA
)
550 (JNIEnv
*env
, jclass clazz
, jmethodID methodID
, jvalue
*args
);
552 void (JNICALL
*CallStaticVoidMethod
)
553 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, ...);
554 void (JNICALL
*CallStaticVoidMethodV
)
555 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, va_list args
);
556 void (JNICALL
*CallStaticVoidMethodA
)
557 (JNIEnv
*env
, jclass cls
, jmethodID methodID
, jvalue
* args
);
559 jfieldID (JNICALL
*GetStaticFieldID
)
560 (JNIEnv
*env
, jclass clazz
, const char *name
, const char *sig
);
561 jobject (JNICALL
*GetStaticObjectField
)
562 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
563 jboolean (JNICALL
*GetStaticBooleanField
)
564 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
565 jbyte (JNICALL
*GetStaticByteField
)
566 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
567 jchar (JNICALL
*GetStaticCharField
)
568 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
569 jshort (JNICALL
*GetStaticShortField
)
570 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
571 jint (JNICALL
*GetStaticIntField
)
572 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
573 jlong (JNICALL
*GetStaticLongField
)
574 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
575 jfloat (JNICALL
*GetStaticFloatField
)
576 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
577 jdouble (JNICALL
*GetStaticDoubleField
)
578 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
);
580 void (JNICALL
*SetStaticObjectField
)
581 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jobject value
);
582 void (JNICALL
*SetStaticBooleanField
)
583 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jboolean value
);
584 void (JNICALL
*SetStaticByteField
)
585 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jbyte value
);
586 void (JNICALL
*SetStaticCharField
)
587 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jchar value
);
588 void (JNICALL
*SetStaticShortField
)
589 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jshort value
);
590 void (JNICALL
*SetStaticIntField
)
591 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jint value
);
592 void (JNICALL
*SetStaticLongField
)
593 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jlong value
);
594 void (JNICALL
*SetStaticFloatField
)
595 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jfloat value
);
596 void (JNICALL
*SetStaticDoubleField
)
597 (JNIEnv
*env
, jclass clazz
, jfieldID fieldID
, jdouble value
);
599 jstring (JNICALL
*NewString
)
600 (JNIEnv
*env
, const jchar
*unicode
, jsize len
);
601 jsize (JNICALL
*GetStringLength
)
602 (JNIEnv
*env
, jstring str
);
603 const jchar
*(JNICALL
*GetStringChars
)
604 (JNIEnv
*env
, jstring str
, jboolean
*isCopy
);
605 void (JNICALL
*ReleaseStringChars
)
606 (JNIEnv
*env
, jstring str
, const jchar
*chars
);
608 jstring (JNICALL
*NewStringUTF
)
609 (JNIEnv
*env
, const char *utf
);
610 jsize (JNICALL
*GetStringUTFLength
)
611 (JNIEnv
*env
, jstring str
);
612 const char* (JNICALL
*GetStringUTFChars
)
613 (JNIEnv
*env
, jstring str
, jboolean
*isCopy
);
614 void (JNICALL
*ReleaseStringUTFChars
)
615 (JNIEnv
*env
, jstring str
, const char* chars
);
618 jsize (JNICALL
*GetArrayLength
)
619 (JNIEnv
*env
, jarray array
);
621 jobjectArray (JNICALL
*NewObjectArray
)
622 (JNIEnv
*env
, jsize len
, jclass clazz
, jobject init
);
623 jobject (JNICALL
*GetObjectArrayElement
)
624 (JNIEnv
*env
, jobjectArray array
, jsize index
);
625 void (JNICALL
*SetObjectArrayElement
)
626 (JNIEnv
*env
, jobjectArray array
, jsize index
, jobject val
);
628 jbooleanArray (JNICALL
*NewBooleanArray
)
629 (JNIEnv
*env
, jsize len
);
630 jbyteArray (JNICALL
*NewByteArray
)
631 (JNIEnv
*env
, jsize len
);
632 jcharArray (JNICALL
*NewCharArray
)
633 (JNIEnv
*env
, jsize len
);
634 jshortArray (JNICALL
*NewShortArray
)
635 (JNIEnv
*env
, jsize len
);
636 jintArray (JNICALL
*NewIntArray
)
637 (JNIEnv
*env
, jsize len
);
638 jlongArray (JNICALL
*NewLongArray
)
639 (JNIEnv
*env
, jsize len
);
640 jfloatArray (JNICALL
*NewFloatArray
)
641 (JNIEnv
*env
, jsize len
);
642 jdoubleArray (JNICALL
*NewDoubleArray
)
643 (JNIEnv
*env
, jsize len
);
645 jboolean
* (JNICALL
*GetBooleanArrayElements
)
646 (JNIEnv
*env
, jbooleanArray array
, jboolean
*isCopy
);
647 jbyte
* (JNICALL
*GetByteArrayElements
)
648 (JNIEnv
*env
, jbyteArray array
, jboolean
*isCopy
);
649 jchar
* (JNICALL
*GetCharArrayElements
)
650 (JNIEnv
*env
, jcharArray array
, jboolean
*isCopy
);
651 jshort
* (JNICALL
*GetShortArrayElements
)
652 (JNIEnv
*env
, jshortArray array
, jboolean
*isCopy
);
653 jint
* (JNICALL
*GetIntArrayElements
)
654 (JNIEnv
*env
, jintArray array
, jboolean
*isCopy
);
655 jlong
* (JNICALL
*GetLongArrayElements
)
656 (JNIEnv
*env
, jlongArray array
, jboolean
*isCopy
);
657 jfloat
* (JNICALL
*GetFloatArrayElements
)
658 (JNIEnv
*env
, jfloatArray array
, jboolean
*isCopy
);
659 jdouble
* (JNICALL
*GetDoubleArrayElements
)
660 (JNIEnv
*env
, jdoubleArray array
, jboolean
*isCopy
);
662 void (JNICALL
*ReleaseBooleanArrayElements
)
663 (JNIEnv
*env
, jbooleanArray array
, jboolean
*elems
, jint mode
);
664 void (JNICALL
*ReleaseByteArrayElements
)
665 (JNIEnv
*env
, jbyteArray array
, jbyte
*elems
, jint mode
);
666 void (JNICALL
*ReleaseCharArrayElements
)
667 (JNIEnv
*env
, jcharArray array
, jchar
*elems
, jint mode
);
668 void (JNICALL
*ReleaseShortArrayElements
)
669 (JNIEnv
*env
, jshortArray array
, jshort
*elems
, jint mode
);
670 void (JNICALL
*ReleaseIntArrayElements
)
671 (JNIEnv
*env
, jintArray array
, jint
*elems
, jint mode
);
672 void (JNICALL
*ReleaseLongArrayElements
)
673 (JNIEnv
*env
, jlongArray array
, jlong
*elems
, jint mode
);
674 void (JNICALL
*ReleaseFloatArrayElements
)
675 (JNIEnv
*env
, jfloatArray array
, jfloat
*elems
, jint mode
);
676 void (JNICALL
*ReleaseDoubleArrayElements
)
677 (JNIEnv
*env
, jdoubleArray array
, jdouble
*elems
, jint mode
);
679 void (JNICALL
*GetBooleanArrayRegion
)
680 (JNIEnv
*env
, jbooleanArray array
, jsize start
, jsize l
, jboolean
*buf
);
681 void (JNICALL
*GetByteArrayRegion
)
682 (JNIEnv
*env
, jbyteArray array
, jsize start
, jsize len
, jbyte
*buf
);
683 void (JNICALL
*GetCharArrayRegion
)
684 (JNIEnv
*env
, jcharArray array
, jsize start
, jsize len
, jchar
*buf
);
685 void (JNICALL
*GetShortArrayRegion
)
686 (JNIEnv
*env
, jshortArray array
, jsize start
, jsize len
, jshort
*buf
);
687 void (JNICALL
*GetIntArrayRegion
)
688 (JNIEnv
*env
, jintArray array
, jsize start
, jsize len
, jint
*buf
);
689 void (JNICALL
*GetLongArrayRegion
)
690 (JNIEnv
*env
, jlongArray array
, jsize start
, jsize len
, jlong
*buf
);
691 void (JNICALL
*GetFloatArrayRegion
)
692 (JNIEnv
*env
, jfloatArray array
, jsize start
, jsize len
, jfloat
*buf
);
693 void (JNICALL
*GetDoubleArrayRegion
)
694 (JNIEnv
*env
, jdoubleArray array
, jsize start
, jsize len
, jdouble
*buf
);
696 void (JNICALL
*SetBooleanArrayRegion
)
697 (JNIEnv
*env
, jbooleanArray array
, jsize start
, jsize l
, jboolean
*buf
);
698 void (JNICALL
*SetByteArrayRegion
)
699 (JNIEnv
*env
, jbyteArray array
, jsize start
, jsize len
, jbyte
*buf
);
700 void (JNICALL
*SetCharArrayRegion
)
701 (JNIEnv
*env
, jcharArray array
, jsize start
, jsize len
, jchar
*buf
);
702 void (JNICALL
*SetShortArrayRegion
)
703 (JNIEnv
*env
, jshortArray array
, jsize start
, jsize len
, jshort
*buf
);
704 void (JNICALL
*SetIntArrayRegion
)
705 (JNIEnv
*env
, jintArray array
, jsize start
, jsize len
, jint
*buf
);
706 void (JNICALL
*SetLongArrayRegion
)
707 (JNIEnv
*env
, jlongArray array
, jsize start
, jsize len
, jlong
*buf
);
708 void (JNICALL
*SetFloatArrayRegion
)
709 (JNIEnv
*env
, jfloatArray array
, jsize start
, jsize len
, jfloat
*buf
);
710 void (JNICALL
*SetDoubleArrayRegion
)
711 (JNIEnv
*env
, jdoubleArray array
, jsize start
, jsize len
, jdouble
*buf
);
713 jint (JNICALL
*RegisterNatives
)
714 (JNIEnv
*env
, jclass clazz
, const JNINativeMethod
*methods
,
716 jint (JNICALL
*UnregisterNatives
)
717 (JNIEnv
*env
, jclass clazz
);
719 jint (JNICALL
*MonitorEnter
)
720 (JNIEnv
*env
, jobject obj
);
721 jint (JNICALL
*MonitorExit
)
722 (JNIEnv
*env
, jobject obj
);
724 jint (JNICALL
*GetJavaVM
)
725 (JNIEnv
*env
, JavaVM
**vm
);
727 void (JNICALL
*GetStringRegion
)
728 (JNIEnv
*env
, jstring str
, jsize start
, jsize len
, jchar
*buf
);
729 void (JNICALL
*GetStringUTFRegion
)
730 (JNIEnv
*env
, jstring str
, jsize start
, jsize len
, char *buf
);
732 void * (JNICALL
*GetPrimitiveArrayCritical
)
733 (JNIEnv
*env
, jarray array
, jboolean
*isCopy
);
734 void (JNICALL
*ReleasePrimitiveArrayCritical
)
735 (JNIEnv
*env
, jarray array
, void *carray
, jint mode
);
737 const jchar
* (JNICALL
*GetStringCritical
)
738 (JNIEnv
*env
, jstring string
, jboolean
*isCopy
);
739 void (JNICALL
*ReleaseStringCritical
)
740 (JNIEnv
*env
, jstring string
, const jchar
*cstring
);
742 jweak (JNICALL
*NewWeakGlobalRef
)
743 (JNIEnv
*env
, jobject obj
);
744 void (JNICALL
*DeleteWeakGlobalRef
)
745 (JNIEnv
*env
, jweak ref
);
747 jboolean (JNICALL
*ExceptionCheck
)
750 jobject (JNICALL
*NewDirectByteBuffer
)
751 (JNIEnv
* env
, void* address
, jlong capacity
);
752 void* (JNICALL
*GetDirectBufferAddress
)
753 (JNIEnv
* env
, jobject buf
);
754 jlong (JNICALL
*GetDirectBufferCapacity
)
755 (JNIEnv
* env
, jobject buf
);
759 * We use inlined functions for C++ so that programmers can write:
761 * env->FindClass("java/lang/String")
763 * in C++ rather than:
765 * (*env)->FindClass(env, "java/lang/String")
771 const struct JNINativeInterface_
*functions
;
775 return functions
->GetVersion(this);
777 jclass
DefineClass(const char *name
, jobject loader
, const jbyte
*buf
,
779 return functions
->DefineClass(this, name
, loader
, buf
, len
);
781 jclass
FindClass(const char *name
) {
782 return functions
->FindClass(this, name
);
784 jmethodID
FromReflectedMethod(jobject method
) {
785 return functions
->FromReflectedMethod(this,method
);
787 jfieldID
FromReflectedField(jobject field
) {
788 return functions
->FromReflectedField(this,field
);
791 jobject
ToReflectedMethod(jclass cls
, jmethodID methodID
, jboolean isStatic
) {
792 return functions
->ToReflectedMethod(this, cls
, methodID
, isStatic
);
795 jclass
GetSuperclass(jclass sub
) {
796 return functions
->GetSuperclass(this, sub
);
798 jboolean
IsAssignableFrom(jclass sub
, jclass sup
) {
799 return functions
->IsAssignableFrom(this, sub
, sup
);
802 jobject
ToReflectedField(jclass cls
, jfieldID fieldID
, jboolean isStatic
) {
803 return functions
->ToReflectedField(this,cls
,fieldID
,isStatic
);
806 jint
Throw(jthrowable obj
) {
807 return functions
->Throw(this, obj
);
809 jint
ThrowNew(jclass clazz
, const char *msg
) {
810 return functions
->ThrowNew(this, clazz
, msg
);
812 jthrowable
ExceptionOccurred() {
813 return functions
->ExceptionOccurred(this);
815 void ExceptionDescribe() {
816 functions
->ExceptionDescribe(this);
818 void ExceptionClear() {
819 functions
->ExceptionClear(this);
821 void FatalError(const char *msg
) {
822 functions
->FatalError(this, msg
);
825 jint
PushLocalFrame(jint capacity
) {
826 return functions
->PushLocalFrame(this,capacity
);
828 jobject
PopLocalFrame(jobject result
) {
829 return functions
->PopLocalFrame(this,result
);
832 jobject
NewGlobalRef(jobject lobj
) {
833 return functions
->NewGlobalRef(this,lobj
);
835 void DeleteGlobalRef(jobject gref
) {
836 functions
->DeleteGlobalRef(this,gref
);
838 void DeleteLocalRef(jobject obj
) {
839 functions
->DeleteLocalRef(this, obj
);
842 jboolean
IsSameObject(jobject obj1
, jobject obj2
) {
843 return functions
->IsSameObject(this,obj1
,obj2
);
846 jobject
NewLocalRef(jobject ref
) {
847 return functions
->NewLocalRef(this,ref
);
849 jint
EnsureLocalCapacity(jint capacity
) {
850 return functions
->EnsureLocalCapacity(this,capacity
);
853 jobject
AllocObject(jclass clazz
) {
854 return functions
->AllocObject(this,clazz
);
856 jobject
NewObject(jclass clazz
, jmethodID methodID
, ...) {
859 va_start(args
, methodID
);
860 result
= functions
->NewObjectV(this,clazz
,methodID
,args
);
864 jobject
NewObjectV(jclass clazz
, jmethodID methodID
,
866 return functions
->NewObjectV(this,clazz
,methodID
,args
);
868 jobject
NewObjectA(jclass clazz
, jmethodID methodID
,
870 return functions
->NewObjectA(this,clazz
,methodID
,args
);
873 jclass
GetObjectClass(jobject obj
) {
874 return functions
->GetObjectClass(this,obj
);
876 jboolean
IsInstanceOf(jobject obj
, jclass clazz
) {
877 return functions
->IsInstanceOf(this,obj
,clazz
);
880 jmethodID
GetMethodID(jclass clazz
, const char *name
,
882 return functions
->GetMethodID(this,clazz
,name
,sig
);
885 jobject
CallObjectMethod(jobject obj
, jmethodID methodID
, ...) {
888 va_start(args
,methodID
);
889 result
= functions
->CallObjectMethodV(this,obj
,methodID
,args
);
893 jobject
CallObjectMethodV(jobject obj
, jmethodID methodID
,
895 return functions
->CallObjectMethodV(this,obj
,methodID
,args
);
897 jobject
CallObjectMethodA(jobject obj
, jmethodID methodID
,
899 return functions
->CallObjectMethodA(this,obj
,methodID
,args
);
902 jboolean
CallBooleanMethod(jobject obj
,
903 jmethodID methodID
, ...) {
906 va_start(args
,methodID
);
907 result
= functions
->CallBooleanMethodV(this,obj
,methodID
,args
);
911 jboolean
CallBooleanMethodV(jobject obj
, jmethodID methodID
,
913 return functions
->CallBooleanMethodV(this,obj
,methodID
,args
);
915 jboolean
CallBooleanMethodA(jobject obj
, jmethodID methodID
,
917 return functions
->CallBooleanMethodA(this,obj
,methodID
, args
);
920 jbyte
CallByteMethod(jobject obj
, jmethodID methodID
, ...) {
923 va_start(args
,methodID
);
924 result
= functions
->CallByteMethodV(this,obj
,methodID
,args
);
928 jbyte
CallByteMethodV(jobject obj
, jmethodID methodID
,
930 return functions
->CallByteMethodV(this,obj
,methodID
,args
);
932 jbyte
CallByteMethodA(jobject obj
, jmethodID methodID
,
934 return functions
->CallByteMethodA(this,obj
,methodID
,args
);
937 jchar
CallCharMethod(jobject obj
, jmethodID methodID
, ...) {
940 va_start(args
,methodID
);
941 result
= functions
->CallCharMethodV(this,obj
,methodID
,args
);
945 jchar
CallCharMethodV(jobject obj
, jmethodID methodID
,
947 return functions
->CallCharMethodV(this,obj
,methodID
,args
);
949 jchar
CallCharMethodA(jobject obj
, jmethodID methodID
,
951 return functions
->CallCharMethodA(this,obj
,methodID
,args
);
954 jshort
CallShortMethod(jobject obj
, jmethodID methodID
, ...) {
957 va_start(args
,methodID
);
958 result
= functions
->CallShortMethodV(this,obj
,methodID
,args
);
962 jshort
CallShortMethodV(jobject obj
, jmethodID methodID
,
964 return functions
->CallShortMethodV(this,obj
,methodID
,args
);
966 jshort
CallShortMethodA(jobject obj
, jmethodID methodID
,
968 return functions
->CallShortMethodA(this,obj
,methodID
,args
);
971 jint
CallIntMethod(jobject obj
, jmethodID methodID
, ...) {
974 va_start(args
,methodID
);
975 result
= functions
->CallIntMethodV(this,obj
,methodID
,args
);
979 jint
CallIntMethodV(jobject obj
, jmethodID methodID
,
981 return functions
->CallIntMethodV(this,obj
,methodID
,args
);
983 jint
CallIntMethodA(jobject obj
, jmethodID methodID
,
985 return functions
->CallIntMethodA(this,obj
,methodID
,args
);
988 jlong
CallLongMethod(jobject obj
, jmethodID methodID
, ...) {
991 va_start(args
,methodID
);
992 result
= functions
->CallLongMethodV(this,obj
,methodID
,args
);
996 jlong
CallLongMethodV(jobject obj
, jmethodID methodID
,
998 return functions
->CallLongMethodV(this,obj
,methodID
,args
);
1000 jlong
CallLongMethodA(jobject obj
, jmethodID methodID
,
1002 return functions
->CallLongMethodA(this,obj
,methodID
,args
);
1005 jfloat
CallFloatMethod(jobject obj
, jmethodID methodID
, ...) {
1008 va_start(args
,methodID
);
1009 result
= functions
->CallFloatMethodV(this,obj
,methodID
,args
);
1013 jfloat
CallFloatMethodV(jobject obj
, jmethodID methodID
,
1015 return functions
->CallFloatMethodV(this,obj
,methodID
,args
);
1017 jfloat
CallFloatMethodA(jobject obj
, jmethodID methodID
,
1019 return functions
->CallFloatMethodA(this,obj
,methodID
,args
);
1022 jdouble
CallDoubleMethod(jobject obj
, jmethodID methodID
, ...) {
1025 va_start(args
,methodID
);
1026 result
= functions
->CallDoubleMethodV(this,obj
,methodID
,args
);
1030 jdouble
CallDoubleMethodV(jobject obj
, jmethodID methodID
,
1032 return functions
->CallDoubleMethodV(this,obj
,methodID
,args
);
1034 jdouble
CallDoubleMethodA(jobject obj
, jmethodID methodID
,
1036 return functions
->CallDoubleMethodA(this,obj
,methodID
,args
);
1039 void CallVoidMethod(jobject obj
, jmethodID methodID
, ...) {
1041 va_start(args
,methodID
);
1042 functions
->CallVoidMethodV(this,obj
,methodID
,args
);
1045 void CallVoidMethodV(jobject obj
, jmethodID methodID
,
1047 functions
->CallVoidMethodV(this,obj
,methodID
,args
);
1049 void CallVoidMethodA(jobject obj
, jmethodID methodID
,
1051 functions
->CallVoidMethodA(this,obj
,methodID
,args
);
1054 jobject
CallNonvirtualObjectMethod(jobject obj
, jclass clazz
,
1055 jmethodID methodID
, ...) {
1058 va_start(args
,methodID
);
1059 result
= functions
->CallNonvirtualObjectMethodV(this,obj
,clazz
,
1064 jobject
CallNonvirtualObjectMethodV(jobject obj
, jclass clazz
,
1065 jmethodID methodID
, va_list args
) {
1066 return functions
->CallNonvirtualObjectMethodV(this,obj
,clazz
,
1069 jobject
CallNonvirtualObjectMethodA(jobject obj
, jclass clazz
,
1070 jmethodID methodID
, jvalue
* args
) {
1071 return functions
->CallNonvirtualObjectMethodA(this,obj
,clazz
,
1075 jboolean
CallNonvirtualBooleanMethod(jobject obj
, jclass clazz
,
1076 jmethodID methodID
, ...) {
1079 va_start(args
,methodID
);
1080 result
= functions
->CallNonvirtualBooleanMethodV(this,obj
,clazz
,
1085 jboolean
CallNonvirtualBooleanMethodV(jobject obj
, jclass clazz
,
1086 jmethodID methodID
, va_list args
) {
1087 return functions
->CallNonvirtualBooleanMethodV(this,obj
,clazz
,
1090 jboolean
CallNonvirtualBooleanMethodA(jobject obj
, jclass clazz
,
1091 jmethodID methodID
, jvalue
* args
) {
1092 return functions
->CallNonvirtualBooleanMethodA(this,obj
,clazz
,
1096 jbyte
CallNonvirtualByteMethod(jobject obj
, jclass clazz
,
1097 jmethodID methodID
, ...) {
1100 va_start(args
,methodID
);
1101 result
= functions
->CallNonvirtualByteMethodV(this,obj
,clazz
,
1106 jbyte
CallNonvirtualByteMethodV(jobject obj
, jclass clazz
,
1107 jmethodID methodID
, va_list args
) {
1108 return functions
->CallNonvirtualByteMethodV(this,obj
,clazz
,
1111 jbyte
CallNonvirtualByteMethodA(jobject obj
, jclass clazz
,
1112 jmethodID methodID
, jvalue
* args
) {
1113 return functions
->CallNonvirtualByteMethodA(this,obj
,clazz
,
1117 jchar
CallNonvirtualCharMethod(jobject obj
, jclass clazz
,
1118 jmethodID methodID
, ...) {
1121 va_start(args
,methodID
);
1122 result
= functions
->CallNonvirtualCharMethodV(this,obj
,clazz
,
1127 jchar
CallNonvirtualCharMethodV(jobject obj
, jclass clazz
,
1128 jmethodID methodID
, va_list args
) {
1129 return functions
->CallNonvirtualCharMethodV(this,obj
,clazz
,
1132 jchar
CallNonvirtualCharMethodA(jobject obj
, jclass clazz
,
1133 jmethodID methodID
, jvalue
* args
) {
1134 return functions
->CallNonvirtualCharMethodA(this,obj
,clazz
,
1138 jshort
CallNonvirtualShortMethod(jobject obj
, jclass clazz
,
1139 jmethodID methodID
, ...) {
1142 va_start(args
,methodID
);
1143 result
= functions
->CallNonvirtualShortMethodV(this,obj
,clazz
,
1148 jshort
CallNonvirtualShortMethodV(jobject obj
, jclass clazz
,
1149 jmethodID methodID
, va_list args
) {
1150 return functions
->CallNonvirtualShortMethodV(this,obj
,clazz
,
1153 jshort
CallNonvirtualShortMethodA(jobject obj
, jclass clazz
,
1154 jmethodID methodID
, jvalue
* args
) {
1155 return functions
->CallNonvirtualShortMethodA(this,obj
,clazz
,
1159 jint
CallNonvirtualIntMethod(jobject obj
, jclass clazz
,
1160 jmethodID methodID
, ...) {
1163 va_start(args
,methodID
);
1164 result
= functions
->CallNonvirtualIntMethodV(this,obj
,clazz
,
1169 jint
CallNonvirtualIntMethodV(jobject obj
, jclass clazz
,
1170 jmethodID methodID
, va_list args
) {
1171 return functions
->CallNonvirtualIntMethodV(this,obj
,clazz
,
1174 jint
CallNonvirtualIntMethodA(jobject obj
, jclass clazz
,
1175 jmethodID methodID
, jvalue
* args
) {
1176 return functions
->CallNonvirtualIntMethodA(this,obj
,clazz
,
1180 jlong
CallNonvirtualLongMethod(jobject obj
, jclass clazz
,
1181 jmethodID methodID
, ...) {
1184 va_start(args
,methodID
);
1185 result
= functions
->CallNonvirtualLongMethodV(this,obj
,clazz
,
1190 jlong
CallNonvirtualLongMethodV(jobject obj
, jclass clazz
,
1191 jmethodID methodID
, va_list args
) {
1192 return functions
->CallNonvirtualLongMethodV(this,obj
,clazz
,
1195 jlong
CallNonvirtualLongMethodA(jobject obj
, jclass clazz
,
1196 jmethodID methodID
, jvalue
* args
) {
1197 return functions
->CallNonvirtualLongMethodA(this,obj
,clazz
,
1201 jfloat
CallNonvirtualFloatMethod(jobject obj
, jclass clazz
,
1202 jmethodID methodID
, ...) {
1205 va_start(args
,methodID
);
1206 result
= functions
->CallNonvirtualFloatMethodV(this,obj
,clazz
,
1211 jfloat
CallNonvirtualFloatMethodV(jobject obj
, jclass clazz
,
1214 return functions
->CallNonvirtualFloatMethodV(this,obj
,clazz
,
1217 jfloat
CallNonvirtualFloatMethodA(jobject obj
, jclass clazz
,
1220 return functions
->CallNonvirtualFloatMethodA(this,obj
,clazz
,
1224 jdouble
CallNonvirtualDoubleMethod(jobject obj
, jclass clazz
,
1225 jmethodID methodID
, ...) {
1228 va_start(args
,methodID
);
1229 result
= functions
->CallNonvirtualDoubleMethodV(this,obj
,clazz
,
1234 jdouble
CallNonvirtualDoubleMethodV(jobject obj
, jclass clazz
,
1237 return functions
->CallNonvirtualDoubleMethodV(this,obj
,clazz
,
1240 jdouble
CallNonvirtualDoubleMethodA(jobject obj
, jclass clazz
,
1243 return functions
->CallNonvirtualDoubleMethodA(this,obj
,clazz
,
1247 void CallNonvirtualVoidMethod(jobject obj
, jclass clazz
,
1248 jmethodID methodID
, ...) {
1250 va_start(args
,methodID
);
1251 functions
->CallNonvirtualVoidMethodV(this,obj
,clazz
,methodID
,args
);
1254 void CallNonvirtualVoidMethodV(jobject obj
, jclass clazz
,
1257 functions
->CallNonvirtualVoidMethodV(this,obj
,clazz
,methodID
,args
);
1259 void CallNonvirtualVoidMethodA(jobject obj
, jclass clazz
,
1262 functions
->CallNonvirtualVoidMethodA(this,obj
,clazz
,methodID
,args
);
1265 jfieldID
GetFieldID(jclass clazz
, const char *name
,
1267 return functions
->GetFieldID(this,clazz
,name
,sig
);
1270 jobject
GetObjectField(jobject obj
, jfieldID fieldID
) {
1271 return functions
->GetObjectField(this,obj
,fieldID
);
1273 jboolean
GetBooleanField(jobject obj
, jfieldID fieldID
) {
1274 return functions
->GetBooleanField(this,obj
,fieldID
);
1276 jbyte
GetByteField(jobject obj
, jfieldID fieldID
) {
1277 return functions
->GetByteField(this,obj
,fieldID
);
1279 jchar
GetCharField(jobject obj
, jfieldID fieldID
) {
1280 return functions
->GetCharField(this,obj
,fieldID
);
1282 jshort
GetShortField(jobject obj
, jfieldID fieldID
) {
1283 return functions
->GetShortField(this,obj
,fieldID
);
1285 jint
GetIntField(jobject obj
, jfieldID fieldID
) {
1286 return functions
->GetIntField(this,obj
,fieldID
);
1288 jlong
GetLongField(jobject obj
, jfieldID fieldID
) {
1289 return functions
->GetLongField(this,obj
,fieldID
);
1291 jfloat
GetFloatField(jobject obj
, jfieldID fieldID
) {
1292 return functions
->GetFloatField(this,obj
,fieldID
);
1294 jdouble
GetDoubleField(jobject obj
, jfieldID fieldID
) {
1295 return functions
->GetDoubleField(this,obj
,fieldID
);
1298 void SetObjectField(jobject obj
, jfieldID fieldID
, jobject val
) {
1299 functions
->SetObjectField(this,obj
,fieldID
,val
);
1301 void SetBooleanField(jobject obj
, jfieldID fieldID
,
1303 functions
->SetBooleanField(this,obj
,fieldID
,val
);
1305 void SetByteField(jobject obj
, jfieldID fieldID
,
1307 functions
->SetByteField(this,obj
,fieldID
,val
);
1309 void SetCharField(jobject obj
, jfieldID fieldID
,
1311 functions
->SetCharField(this,obj
,fieldID
,val
);
1313 void SetShortField(jobject obj
, jfieldID fieldID
,
1315 functions
->SetShortField(this,obj
,fieldID
,val
);
1317 void SetIntField(jobject obj
, jfieldID fieldID
,
1319 functions
->SetIntField(this,obj
,fieldID
,val
);
1321 void SetLongField(jobject obj
, jfieldID fieldID
,
1323 functions
->SetLongField(this,obj
,fieldID
,val
);
1325 void SetFloatField(jobject obj
, jfieldID fieldID
,
1327 functions
->SetFloatField(this,obj
,fieldID
,val
);
1329 void SetDoubleField(jobject obj
, jfieldID fieldID
,
1331 functions
->SetDoubleField(this,obj
,fieldID
,val
);
1334 jmethodID
GetStaticMethodID(jclass clazz
, const char *name
,
1336 return functions
->GetStaticMethodID(this,clazz
,name
,sig
);
1339 jobject
CallStaticObjectMethod(jclass clazz
, jmethodID methodID
,
1343 va_start(args
,methodID
);
1344 result
= functions
->CallStaticObjectMethodV(this,clazz
,methodID
,args
);
1348 jobject
CallStaticObjectMethodV(jclass clazz
, jmethodID methodID
,
1350 return functions
->CallStaticObjectMethodV(this,clazz
,methodID
,args
);
1352 jobject
CallStaticObjectMethodA(jclass clazz
, jmethodID methodID
,
1354 return functions
->CallStaticObjectMethodA(this,clazz
,methodID
,args
);
1357 jboolean
CallStaticBooleanMethod(jclass clazz
,
1358 jmethodID methodID
, ...) {
1361 va_start(args
,methodID
);
1362 result
= functions
->CallStaticBooleanMethodV(this,clazz
,methodID
,args
);
1366 jboolean
CallStaticBooleanMethodV(jclass clazz
,
1367 jmethodID methodID
, va_list args
) {
1368 return functions
->CallStaticBooleanMethodV(this,clazz
,methodID
,args
);
1370 jboolean
CallStaticBooleanMethodA(jclass clazz
,
1371 jmethodID methodID
, jvalue
*args
) {
1372 return functions
->CallStaticBooleanMethodA(this,clazz
,methodID
,args
);
1375 jbyte
CallStaticByteMethod(jclass clazz
,
1376 jmethodID methodID
, ...) {
1379 va_start(args
,methodID
);
1380 result
= functions
->CallStaticByteMethodV(this,clazz
,methodID
,args
);
1384 jbyte
CallStaticByteMethodV(jclass clazz
,
1385 jmethodID methodID
, va_list args
) {
1386 return functions
->CallStaticByteMethodV(this,clazz
,methodID
,args
);
1388 jbyte
CallStaticByteMethodA(jclass clazz
,
1389 jmethodID methodID
, jvalue
*args
) {
1390 return functions
->CallStaticByteMethodA(this,clazz
,methodID
,args
);
1393 jchar
CallStaticCharMethod(jclass clazz
,
1394 jmethodID methodID
, ...) {
1397 va_start(args
,methodID
);
1398 result
= functions
->CallStaticCharMethodV(this,clazz
,methodID
,args
);
1402 jchar
CallStaticCharMethodV(jclass clazz
,
1403 jmethodID methodID
, va_list args
) {
1404 return functions
->CallStaticCharMethodV(this,clazz
,methodID
,args
);
1406 jchar
CallStaticCharMethodA(jclass clazz
,
1407 jmethodID methodID
, jvalue
*args
) {
1408 return functions
->CallStaticCharMethodA(this,clazz
,methodID
,args
);
1411 jshort
CallStaticShortMethod(jclass clazz
,
1412 jmethodID methodID
, ...) {
1415 va_start(args
,methodID
);
1416 result
= functions
->CallStaticShortMethodV(this,clazz
,methodID
,args
);
1420 jshort
CallStaticShortMethodV(jclass clazz
,
1421 jmethodID methodID
, va_list args
) {
1422 return functions
->CallStaticShortMethodV(this,clazz
,methodID
,args
);
1424 jshort
CallStaticShortMethodA(jclass clazz
,
1425 jmethodID methodID
, jvalue
*args
) {
1426 return functions
->CallStaticShortMethodA(this,clazz
,methodID
,args
);
1429 jint
CallStaticIntMethod(jclass clazz
,
1430 jmethodID methodID
, ...) {
1433 va_start(args
,methodID
);
1434 result
= functions
->CallStaticIntMethodV(this,clazz
,methodID
,args
);
1438 jint
CallStaticIntMethodV(jclass clazz
,
1439 jmethodID methodID
, va_list args
) {
1440 return functions
->CallStaticIntMethodV(this,clazz
,methodID
,args
);
1442 jint
CallStaticIntMethodA(jclass clazz
,
1443 jmethodID methodID
, jvalue
*args
) {
1444 return functions
->CallStaticIntMethodA(this,clazz
,methodID
,args
);
1447 jlong
CallStaticLongMethod(jclass clazz
,
1448 jmethodID methodID
, ...) {
1451 va_start(args
,methodID
);
1452 result
= functions
->CallStaticLongMethodV(this,clazz
,methodID
,args
);
1456 jlong
CallStaticLongMethodV(jclass clazz
,
1457 jmethodID methodID
, va_list args
) {
1458 return functions
->CallStaticLongMethodV(this,clazz
,methodID
,args
);
1460 jlong
CallStaticLongMethodA(jclass clazz
,
1461 jmethodID methodID
, jvalue
*args
) {
1462 return functions
->CallStaticLongMethodA(this,clazz
,methodID
,args
);
1465 jfloat
CallStaticFloatMethod(jclass clazz
,
1466 jmethodID methodID
, ...) {
1469 va_start(args
,methodID
);
1470 result
= functions
->CallStaticFloatMethodV(this,clazz
,methodID
,args
);
1474 jfloat
CallStaticFloatMethodV(jclass clazz
,
1475 jmethodID methodID
, va_list args
) {
1476 return functions
->CallStaticFloatMethodV(this,clazz
,methodID
,args
);
1478 jfloat
CallStaticFloatMethodA(jclass clazz
,
1479 jmethodID methodID
, jvalue
*args
) {
1480 return functions
->CallStaticFloatMethodA(this,clazz
,methodID
,args
);
1483 jdouble
CallStaticDoubleMethod(jclass clazz
,
1484 jmethodID methodID
, ...) {
1487 va_start(args
,methodID
);
1488 result
= functions
->CallStaticDoubleMethodV(this,clazz
,methodID
,args
);
1492 jdouble
CallStaticDoubleMethodV(jclass clazz
,
1493 jmethodID methodID
, va_list args
) {
1494 return functions
->CallStaticDoubleMethodV(this,clazz
,methodID
,args
);
1496 jdouble
CallStaticDoubleMethodA(jclass clazz
,
1497 jmethodID methodID
, jvalue
*args
) {
1498 return functions
->CallStaticDoubleMethodA(this,clazz
,methodID
,args
);
1501 void CallStaticVoidMethod(jclass cls
, jmethodID methodID
, ...) {
1503 va_start(args
,methodID
);
1504 functions
->CallStaticVoidMethodV(this,cls
,methodID
,args
);
1507 void CallStaticVoidMethodV(jclass cls
, jmethodID methodID
,
1509 functions
->CallStaticVoidMethodV(this,cls
,methodID
,args
);
1511 void CallStaticVoidMethodA(jclass cls
, jmethodID methodID
,
1513 functions
->CallStaticVoidMethodA(this,cls
,methodID
,args
);
1516 jfieldID
GetStaticFieldID(jclass clazz
, const char *name
,
1518 return functions
->GetStaticFieldID(this,clazz
,name
,sig
);
1520 jobject
GetStaticObjectField(jclass clazz
, jfieldID fieldID
) {
1521 return functions
->GetStaticObjectField(this,clazz
,fieldID
);
1523 jboolean
GetStaticBooleanField(jclass clazz
, jfieldID fieldID
) {
1524 return functions
->GetStaticBooleanField(this,clazz
,fieldID
);
1526 jbyte
GetStaticByteField(jclass clazz
, jfieldID fieldID
) {
1527 return functions
->GetStaticByteField(this,clazz
,fieldID
);
1529 jchar
GetStaticCharField(jclass clazz
, jfieldID fieldID
) {
1530 return functions
->GetStaticCharField(this,clazz
,fieldID
);
1532 jshort
GetStaticShortField(jclass clazz
, jfieldID fieldID
) {
1533 return functions
->GetStaticShortField(this,clazz
,fieldID
);
1535 jint
GetStaticIntField(jclass clazz
, jfieldID fieldID
) {
1536 return functions
->GetStaticIntField(this,clazz
,fieldID
);
1538 jlong
GetStaticLongField(jclass clazz
, jfieldID fieldID
) {
1539 return functions
->GetStaticLongField(this,clazz
,fieldID
);
1541 jfloat
GetStaticFloatField(jclass clazz
, jfieldID fieldID
) {
1542 return functions
->GetStaticFloatField(this,clazz
,fieldID
);
1544 jdouble
GetStaticDoubleField(jclass clazz
, jfieldID fieldID
) {
1545 return functions
->GetStaticDoubleField(this,clazz
,fieldID
);
1548 void SetStaticObjectField(jclass clazz
, jfieldID fieldID
,
1550 functions
->SetStaticObjectField(this,clazz
,fieldID
,value
);
1552 void SetStaticBooleanField(jclass clazz
, jfieldID fieldID
,
1554 functions
->SetStaticBooleanField(this,clazz
,fieldID
,value
);
1556 void SetStaticByteField(jclass clazz
, jfieldID fieldID
,
1558 functions
->SetStaticByteField(this,clazz
,fieldID
,value
);
1560 void SetStaticCharField(jclass clazz
, jfieldID fieldID
,
1562 functions
->SetStaticCharField(this,clazz
,fieldID
,value
);
1564 void SetStaticShortField(jclass clazz
, jfieldID fieldID
,
1566 functions
->SetStaticShortField(this,clazz
,fieldID
,value
);
1568 void SetStaticIntField(jclass clazz
, jfieldID fieldID
,
1570 functions
->SetStaticIntField(this,clazz
,fieldID
,value
);
1572 void SetStaticLongField(jclass clazz
, jfieldID fieldID
,
1574 functions
->SetStaticLongField(this,clazz
,fieldID
,value
);
1576 void SetStaticFloatField(jclass clazz
, jfieldID fieldID
,
1578 functions
->SetStaticFloatField(this,clazz
,fieldID
,value
);
1580 void SetStaticDoubleField(jclass clazz
, jfieldID fieldID
,
1582 functions
->SetStaticDoubleField(this,clazz
,fieldID
,value
);
1585 jstring
NewString(const jchar
*unicode
, jsize len
) {
1586 return functions
->NewString(this,unicode
,len
);
1588 jsize
GetStringLength(jstring str
) {
1589 return functions
->GetStringLength(this,str
);
1591 const jchar
*GetStringChars(jstring str
, jboolean
*isCopy
) {
1592 return functions
->GetStringChars(this,str
,isCopy
);
1594 void ReleaseStringChars(jstring str
, const jchar
*chars
) {
1595 functions
->ReleaseStringChars(this,str
,chars
);
1598 jstring
NewStringUTF(const char *utf
) {
1599 return functions
->NewStringUTF(this,utf
);
1601 jsize
GetStringUTFLength(jstring str
) {
1602 return functions
->GetStringUTFLength(this,str
);
1604 const char* GetStringUTFChars(jstring str
, jboolean
*isCopy
) {
1605 return functions
->GetStringUTFChars(this,str
,isCopy
);
1607 void ReleaseStringUTFChars(jstring str
, const char* chars
) {
1608 functions
->ReleaseStringUTFChars(this,str
,chars
);
1611 jsize
GetArrayLength(jarray array
) {
1612 return functions
->GetArrayLength(this,array
);
1615 jobjectArray
NewObjectArray(jsize len
, jclass clazz
,
1617 return functions
->NewObjectArray(this,len
,clazz
,init
);
1619 jobject
GetObjectArrayElement(jobjectArray array
, jsize index
) {
1620 return functions
->GetObjectArrayElement(this,array
,index
);
1622 void SetObjectArrayElement(jobjectArray array
, jsize index
,
1624 functions
->SetObjectArrayElement(this,array
,index
,val
);
1627 jbooleanArray
NewBooleanArray(jsize len
) {
1628 return functions
->NewBooleanArray(this,len
);
1630 jbyteArray
NewByteArray(jsize len
) {
1631 return functions
->NewByteArray(this,len
);
1633 jcharArray
NewCharArray(jsize len
) {
1634 return functions
->NewCharArray(this,len
);
1636 jshortArray
NewShortArray(jsize len
) {
1637 return functions
->NewShortArray(this,len
);
1639 jintArray
NewIntArray(jsize len
) {
1640 return functions
->NewIntArray(this,len
);
1642 jlongArray
NewLongArray(jsize len
) {
1643 return functions
->NewLongArray(this,len
);
1645 jfloatArray
NewFloatArray(jsize len
) {
1646 return functions
->NewFloatArray(this,len
);
1648 jdoubleArray
NewDoubleArray(jsize len
) {
1649 return functions
->NewDoubleArray(this,len
);
1652 jboolean
* GetBooleanArrayElements(jbooleanArray array
, jboolean
*isCopy
) {
1653 return functions
->GetBooleanArrayElements(this,array
,isCopy
);
1655 jbyte
* GetByteArrayElements(jbyteArray array
, jboolean
*isCopy
) {
1656 return functions
->GetByteArrayElements(this,array
,isCopy
);
1658 jchar
* GetCharArrayElements(jcharArray array
, jboolean
*isCopy
) {
1659 return functions
->GetCharArrayElements(this,array
,isCopy
);
1661 jshort
* GetShortArrayElements(jshortArray array
, jboolean
*isCopy
) {
1662 return functions
->GetShortArrayElements(this,array
,isCopy
);
1664 jint
* GetIntArrayElements(jintArray array
, jboolean
*isCopy
) {
1665 return functions
->GetIntArrayElements(this,array
,isCopy
);
1667 jlong
* GetLongArrayElements(jlongArray array
, jboolean
*isCopy
) {
1668 return functions
->GetLongArrayElements(this,array
,isCopy
);
1670 jfloat
* GetFloatArrayElements(jfloatArray array
, jboolean
*isCopy
) {
1671 return functions
->GetFloatArrayElements(this,array
,isCopy
);
1673 jdouble
* GetDoubleArrayElements(jdoubleArray array
, jboolean
*isCopy
) {
1674 return functions
->GetDoubleArrayElements(this,array
,isCopy
);
1677 void ReleaseBooleanArrayElements(jbooleanArray array
,
1680 functions
->ReleaseBooleanArrayElements(this,array
,elems
,mode
);
1682 void ReleaseByteArrayElements(jbyteArray array
,
1685 functions
->ReleaseByteArrayElements(this,array
,elems
,mode
);
1687 void ReleaseCharArrayElements(jcharArray array
,
1690 functions
->ReleaseCharArrayElements(this,array
,elems
,mode
);
1692 void ReleaseShortArrayElements(jshortArray array
,
1695 functions
->ReleaseShortArrayElements(this,array
,elems
,mode
);
1697 void ReleaseIntArrayElements(jintArray array
,
1700 functions
->ReleaseIntArrayElements(this,array
,elems
,mode
);
1702 void ReleaseLongArrayElements(jlongArray array
,
1705 functions
->ReleaseLongArrayElements(this,array
,elems
,mode
);
1707 void ReleaseFloatArrayElements(jfloatArray array
,
1710 functions
->ReleaseFloatArrayElements(this,array
,elems
,mode
);
1712 void ReleaseDoubleArrayElements(jdoubleArray array
,
1715 functions
->ReleaseDoubleArrayElements(this,array
,elems
,mode
);
1718 void GetBooleanArrayRegion(jbooleanArray array
,
1719 jsize start
, jsize len
, jboolean
*buf
) {
1720 functions
->GetBooleanArrayRegion(this,array
,start
,len
,buf
);
1722 void GetByteArrayRegion(jbyteArray array
,
1723 jsize start
, jsize len
, jbyte
*buf
) {
1724 functions
->GetByteArrayRegion(this,array
,start
,len
,buf
);
1726 void GetCharArrayRegion(jcharArray array
,
1727 jsize start
, jsize len
, jchar
*buf
) {
1728 functions
->GetCharArrayRegion(this,array
,start
,len
,buf
);
1730 void GetShortArrayRegion(jshortArray array
,
1731 jsize start
, jsize len
, jshort
*buf
) {
1732 functions
->GetShortArrayRegion(this,array
,start
,len
,buf
);
1734 void GetIntArrayRegion(jintArray array
,
1735 jsize start
, jsize len
, jint
*buf
) {
1736 functions
->GetIntArrayRegion(this,array
,start
,len
,buf
);
1738 void GetLongArrayRegion(jlongArray array
,
1739 jsize start
, jsize len
, jlong
*buf
) {
1740 functions
->GetLongArrayRegion(this,array
,start
,len
,buf
);
1742 void GetFloatArrayRegion(jfloatArray array
,
1743 jsize start
, jsize len
, jfloat
*buf
) {
1744 functions
->GetFloatArrayRegion(this,array
,start
,len
,buf
);
1746 void GetDoubleArrayRegion(jdoubleArray array
,
1747 jsize start
, jsize len
, jdouble
*buf
) {
1748 functions
->GetDoubleArrayRegion(this,array
,start
,len
,buf
);
1751 void SetBooleanArrayRegion(jbooleanArray array
, jsize start
, jsize len
,
1753 functions
->SetBooleanArrayRegion(this,array
,start
,len
,buf
);
1755 void SetByteArrayRegion(jbyteArray array
, jsize start
, jsize len
,
1757 functions
->SetByteArrayRegion(this,array
,start
,len
,buf
);
1759 void SetCharArrayRegion(jcharArray array
, jsize start
, jsize len
,
1761 functions
->SetCharArrayRegion(this,array
,start
,len
,buf
);
1763 void SetShortArrayRegion(jshortArray array
, jsize start
, jsize len
,
1765 functions
->SetShortArrayRegion(this,array
,start
,len
,buf
);
1767 void SetIntArrayRegion(jintArray array
, jsize start
, jsize len
,
1769 functions
->SetIntArrayRegion(this,array
,start
,len
,buf
);
1771 void SetLongArrayRegion(jlongArray array
, jsize start
, jsize len
,
1773 functions
->SetLongArrayRegion(this,array
,start
,len
,buf
);
1775 void SetFloatArrayRegion(jfloatArray array
, jsize start
, jsize len
,
1777 functions
->SetFloatArrayRegion(this,array
,start
,len
,buf
);
1779 void SetDoubleArrayRegion(jdoubleArray array
, jsize start
, jsize len
,
1781 functions
->SetDoubleArrayRegion(this,array
,start
,len
,buf
);
1784 jint
RegisterNatives(jclass clazz
, const JNINativeMethod
*methods
,
1786 return functions
->RegisterNatives(this,clazz
,methods
,nMethods
);
1788 jint
UnregisterNatives(jclass clazz
) {
1789 return functions
->UnregisterNatives(this,clazz
);
1792 jint
MonitorEnter(jobject obj
) {
1793 return functions
->MonitorEnter(this,obj
);
1795 jint
MonitorExit(jobject obj
) {
1796 return functions
->MonitorExit(this,obj
);
1799 jint
GetJavaVM(JavaVM
**vm
) {
1800 return functions
->GetJavaVM(this,vm
);
1803 void GetStringRegion(jstring str
, jsize start
, jsize len
, jchar
*buf
) {
1804 functions
->GetStringRegion(this,str
,start
,len
,buf
);
1806 void GetStringUTFRegion(jstring str
, jsize start
, jsize len
, char *buf
) {
1807 functions
->GetStringUTFRegion(this,str
,start
,len
,buf
);
1810 void * GetPrimitiveArrayCritical(jarray array
, jboolean
*isCopy
) {
1811 return functions
->GetPrimitiveArrayCritical(this,array
,isCopy
);
1813 void ReleasePrimitiveArrayCritical(jarray array
, void *carray
, jint mode
) {
1814 functions
->ReleasePrimitiveArrayCritical(this,array
,carray
,mode
);
1817 const jchar
* GetStringCritical(jstring string
, jboolean
*isCopy
) {
1818 return functions
->GetStringCritical(this,string
,isCopy
);
1820 void ReleaseStringCritical(jstring string
, const jchar
*cstring
) {
1821 functions
->ReleaseStringCritical(this,string
,cstring
);
1824 jweak
NewWeakGlobalRef(jobject obj
) {
1825 return functions
->NewWeakGlobalRef(this,obj
);
1827 void DeleteWeakGlobalRef(jweak ref
) {
1828 functions
->DeleteWeakGlobalRef(this,ref
);
1831 jboolean
ExceptionCheck() {
1832 return functions
->ExceptionCheck(this);
1835 jobject
NewDirectByteBuffer(void* address
, jlong capacity
) {
1836 return functions
->NewDirectByteBuffer(this, address
, capacity
);
1838 void* GetDirectBufferAddress(jobject buf
) {
1839 return functions
->GetDirectBufferAddress(this, buf
);
1841 jlong
GetDirectBufferCapacity(jobject buf
) {
1842 return functions
->GetDirectBufferCapacity(this, buf
);
1845 #endif /* __cplusplus */
1848 typedef struct JavaVMOption
{
1853 typedef struct JavaVMInitArgs
{
1857 JavaVMOption
*options
;
1858 jboolean ignoreUnrecognized
;
1861 typedef struct JavaVMAttachArgs
{
1868 /* These structures will be VM-specific. */
1870 typedef struct JDK1_1InitArgs
{
1875 jint nativeStackSize
;
1882 jint (JNICALL
*vfprintf
)(FILE *fp
, const char *format
, va_list args
);
1883 void (JNICALL
*exit
)(jint code
);
1884 void (JNICALL
*abort
)(void);
1887 jint enableVerboseGC
;
1888 jint disableAsyncGC
;
1894 typedef struct JDK1_1AttachArgs
{
1895 void * __padding
; /* C compilers don't allow empty structures. */
1901 /* End VM-specific. */
1903 struct JNIInvokeInterface_
{
1908 jint (JNICALL
*DestroyJavaVM
)(JavaVM
*vm
);
1910 jint (JNICALL
*AttachCurrentThread
)(JavaVM
*vm
, void **penv
, void *args
);
1912 jint (JNICALL
*DetachCurrentThread
)(JavaVM
*vm
);
1914 jint (JNICALL
*GetEnv
)(JavaVM
*vm
, void **penv
, jint version
);
1916 jint (JNICALL
*AttachCurrentThreadAsDaemon
)(JavaVM
*vm
, void **penv
, void *args
);
1920 const struct JNIInvokeInterface_
*functions
;
1923 jint
DestroyJavaVM() {
1924 return functions
->DestroyJavaVM(this);
1926 jint
AttachCurrentThread(void **penv
, void *args
) {
1927 return functions
->AttachCurrentThread(this, penv
, args
);
1929 jint
DetachCurrentThread() {
1930 return functions
->DetachCurrentThread(this);
1933 jint
GetEnv(void **penv
, jint version
) {
1934 return functions
->GetEnv(this, penv
, version
);
1936 jint
AttachCurrentThreadAsDaemon(void **penv
, void *args
) {
1937 return functions
->AttachCurrentThreadAsDaemon(this, penv
, args
);
1942 #ifdef _JNI_IMPLEMENTATION_
1943 #define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
1945 #define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
1947 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1948 JNI_GetDefaultJavaVMInitArgs(void *args
);
1950 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1951 JNI_CreateJavaVM(JavaVM
**pvm
, void **penv
, void *args
);
1953 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1954 JNI_GetCreatedJavaVMs(JavaVM
**, jsize
, jsize
*);
1956 /* Defined by native libraries. */
1957 JNIEXPORT jint JNICALL
1958 JNI_OnLoad(JavaVM
*vm
, void *reserved
);
1960 JNIEXPORT
void JNICALL
1961 JNI_OnUnload(JavaVM
*vm
, void *reserved
);
1963 #define JNI_VERSION_1_1 0x00010001
1964 #define JNI_VERSION_1_2 0x00010002
1965 #define JNI_VERSION_1_4 0x00010004
1969 #endif /* __cplusplus */